from setuptools import setup
import os
from glob import glob

package_name = 'my_vision_pkg'

setup(
    name=package_name,
    version='0.0.0',
    packages=[package_name],
    data_files=[
        ('share/ament_index/resource_index/packages',
            ['resource/' + package_name]),
        ('share/' + package_name, ['package.xml']),
        
        # 这行代码的意思是：找到 'launch' 文件夹下的所有以 '.py' 结尾的文件
        # 然后将它们安装到 'share/my_vision_pkg/launch' 目录下
        (os.path.join('share', package_name, 'launch'), glob('launch/*.py')),
        (os.path.join('share', package_name, 'config'), glob('config/*.yaml')),

        # --- 模型和数据文件规则 ---
        (os.path.join('share', package_name), glob(os.path.join(package_name, '*.pt'))),
        (os.path.join('share', package_name), glob(os.path.join(package_name, '*.npz'))),
        
    ],
    install_requires=['setuptools'],
    zip_safe=True,
    maintainer='Your Name',
    maintainer_email='your_email@todo.todo',
    description='Final vision system node for innovation project',
    license='Apache License 2.0',
    tests_require=['pytest'],
    entry_points={
        'console_scripts': [
            'vision_node = my_vision_pkg.vision_node:main',
            'tf_broadcaster_node = my_vision_pkg.tf_broadcaster_node:main',
        ],
    },
)
